package net.wofly.sale.commodity.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.commodity.repository.CommodityParamInsRepository;
import net.wofly.sale.commodity.domain.CommodityParamIns;
import net.wofly.sale.commodity.service.ICommodityParamInsService;

@Service("iCommodityParamInsService")
@Transactional
public class CommodityParamInsServiceImpl implements ICommodityParamInsService {

	@Autowired
	CommodityParamInsRepository commodityParamInsRepository;

	@Override
	public CommodityParamIns save(CommodityParamIns entity) {
		return commodityParamInsRepository.save(entity);
	}

	@Override
	public void delete(CommodityParamIns entity) {
		commodityParamInsRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		commodityParamInsRepository.delete(key);
	}

	@Override
	public CommodityParamIns findOne(String key) {
		return commodityParamInsRepository.findOne(key);
	}

	@Override
	public List<CommodityParamIns> save(List<CommodityParamIns> entityList) {
		return (List<CommodityParamIns>) commodityParamInsRepository.save(entityList);
	}
}
